setAccessibilityDelegate

Sets a delegate for implementing accessibility support via composition (as opposed to inheritance). For more details, see AccessibilityDelegateCompat.

Note: On platform versions prior to API 23, delegate methods on views in the android.widget.* package are called before host methods. This prevents certain properties such as class name from being modified by overriding onInitializeAccessibilityNodeInfo, as any changes will be overwritten by the host class.

Starting in API 23, delegate methods are called after host methods, which all properties to be modified without being overwritten by the host class.

If an AccessibilityDelegateCompat is already attached to the view, and this method sets the delegate to null, an empty delegate will be attached to ensure that other compatibility behavior continues to work for this view.

Parameters

v

view for which to set the delegate.

delegate

the object to which accessibility method calls should be delegated

See also